module general
implicit none
   !----------------------------------------------------------------------------
   character (len=40)  :: subname, subnamep
   character (len=200) :: info
   character (len=80 ) :: outfile, xyzfile
   !----------------------------------------------------------------------------
end module general

module cell
use prec
implicit none
   !----------------------------------------------------------------------------
   real(q), parameter :: TPI = 2.D0*3.141592653589793D0, NA = 6.02214129D0
   !----------------------------------------------------------------------------
   integer :: natom=0, natmtyp, nbndtyp, nangtyp, ndihtyp, nbonds, nangls, ndihrs
   integer :: nmols, ioerr, idum
   !----------------------------------------------------------------------------
   real(q) :: box(3), density, mass, volume, rbox(3), delv
   real(q) :: zboxlow, zboxhigh
   !----------------------------------------------------------------------------
   character (len=2),allocatable :: EName(:)
   character (len=100)  :: title
   !----------------------------------------------------------------------------
   integer, allocatable :: bonds(:,:), angls(:,:), dihrs(:,:)
   integer, allocatable :: attyp(:), molID(:)
   real(q), allocatable :: atpos(:,:), atchg(:)
   !----------------------------------------------------------------------------
   ! Base information
   integer :: natomMol, ntypeMol, nbndtypMol, nangtypMol, ndihtypMol,          &
   &          nbondsMol, nanglsMol, ndihrsMol, nMol
   real(q) :: molmass, minbox(3), minlen, den0
   character (len=100)  :: molform, molname
   integer, allocatable :: bondsMol(:,:), anglsMol(:,:), dihrsMol(:,:)
   integer, allocatable :: attypMol(:), molIDMol(:)
   real(q), allocatable :: atposMol(:,:), EMass(:), rotatedMol(:,:)
   real(q), allocatable :: DistMin(:)
   ! LJ Parameters
   real(q), allocatable :: sigma(:), epison(:), chargeMol(:)
   ! FF Parameters
   real(q), allocatable :: bondcoef(:,:), anglcoef(:,:), torscoef(:,:)
   !----------------------------------------------------------------------------
end module
